<?php
$id= mysql_escape_string($_GET["id"]);
$path= mysql_escape_string($_GET["path"]);
$name= mysql_escape_string($_GET["name"]);
$pathname=$path . $name;

require_once ("../../config.inc.php");
require_once ("../../include/mysql.inc.php");
require_once ("../../include/res.inc.php");
require_once ("../../include/resTag.inc.php");
$ResDao = new Res();
$flag =$ResDao->delete($id);

if (!unlink($pathname))
{
	echo ("Error deleting $file");
}
else
{
	echo ("Deleted $file");
}
if ($flag) {
		echo "删除资源成功！<br/><a href='../../admin/resList.php'>跳转到文章列表</a>";
	}
	else {
		echo "删除资源失败！<br/><a href='../../admin/resList.php'>跳转到文章列表</a>";
	}
?>